<?php
include("../../config/config.php");
$DM->loadClass("testePack","testeClass");
// create and instance class
$object_testeClass = new testeClass();
$object_testeClass->teste_id = array_key_exists("teste_id",$_POST)?$_POST["teste_id"]:""; 
$object_testeClass->nome = array_key_exists("nome",$_POST)?$_POST["nome"]:""; 
$object_testeClass->email = array_key_exists("email",$_POST)?$_POST["email"]:""; 
$object_testeClass->apelido = array_key_exists("apelido",$_POST)?$_POST["apelido"]:""; 
$object_testeClass->habilitado = array_key_exists("habilitado",$_POST)?$_POST["habilitado"]:""; 
$object_testeClass->sexo = array_key_exists("sexo",$_POST)?$_POST["sexo"]:""; 
$object_testeClass->updated_on = array_key_exists("updated_on",$_POST)?$_POST["updated_on"]:""; 
$object_testeClass->created_on = array_key_exists("created_on",$_POST)?$_POST["created_on"]:""; 
if ($object_testeClass->save()){
	header("Location: testeClass.list.php");
}else{
	exit("Erro ao salvar testeClass");
}
?>
